package com.secsbrain.cmdb.client.iface;

import java.util.List;
import java.util.Map;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.secsbrain.common.ResponseVo;
import com.secsbrain.cmdb.client.model.HostDetail;

/**
 * 主机信息相关服务
 *
 * @author zhaoyi
 */
@FeignClient("service-cmdb")
public interface HostInfoService {
	
	 /**
     * 功能描述: <br>
     * 通过主机Id查询主机信息
     *
     * @return
     */
    @RequestMapping(value = "/cmdbservice/queryHostDetailById", method = RequestMethod.GET)
	ResponseVo<HostDetail> queryHostDetailById(@RequestParam("hostId")Long hostId);
    
    /**
     * 功能描述: <br>
     * 查询所有主机
     *
     * @return
     */
    @RequestMapping(value = "/cmdbservice/queryAllHost", method = RequestMethod.GET)
	ResponseVo<List<HostDetail>> queryAllHost();
    
    /**
     * 功能描述: <br>
     * 通过主机名查询IP地址
     *
     * @return
     */
    @RequestMapping(value = "/cmdbservice/queryIpByHost", method = RequestMethod.GET)
	ResponseVo<Map<String,List<String>>> queryIpByHost(@RequestParam("hostList")String[] hostList);
    
}
